﻿<%@ Page Title="我的商品" Language="C#" MasterPageFile="~/member/mMenber.master" AutoEventWireup="true" CodeBehind="Items.aspx.cs" Inherits="map.member.Items" %>

<%@ Register Assembly="RuleCode.Common" Namespace="RuleCode.Controls" TagPrefix="cc1" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head2" runat="server">
    <style type ="text/css" >
       .MasterDiv
       {
           width:820px;
       } 
       .DataListHeaderTable
       {
           width:100%;
           padding-top:5px;
       }
       .DataListItemTable
       {
           width:100%;
           margin:4px 0px 4px 0px;
       }
       .DataListItemTable td
       {
           text-align:left ;
       }
       .DataListItemTable td img
       {
           border:none;
       }
       .DataListHeaderToolDiv , .DataListFooterToolDiv
       {
           width:100%;
           margin-top:2px;
           border-top:solid 1px lightGray;
           border-bottom: solid 1px lightGray;
           background-color:#ECECEC;
           padding-top:3px;
           padding-bottom :3px;
       }
       .DataListHeaderToolDiv table , .DataListFooterToolDiv table
       {
           padding-left:30px;
       }
       .DataListFooterToolDiv table td ,.DataListHeaderToolDiv table td
       {
           padding-left:5px;
       }
       .searchItemsDiv
       {
           width:100%;
       }
       .searchFilterDiv
       {
           width:100%;
           border:solid 1px lightGray;
           background-color:#ECECEC;
           padding:5px 0px 5px 0px;
           text-align:center;
       }
       .searchItemsDiv a
       {
           background:transparent url(../img/toggle_bg.gif) no-repeat scroll 0px -80px;
           overflow:hidden ;
           display:block;
           height:20px;
           width:100%;
           margin:0 auto;
           text-indent:-999em;
       }
       .searchItemsDiv a:hover
       {
           background-position:0px -120px;
       }
       .searchItemsDiv a.collapsed
       {
           background-position:0px 0px;
       }
       .searchItemsDiv a.collapsed:hover
       {
           background-position:0px -40px;
       }
       .allItemsUl li
       {
           border-bottom:solid 1px lightBlue;
           background: url(../img/tagleft.gif) no-repeat left top;
           height:23px;
           float:left ;  
           display:inline;
           list-style-type:none;  
           margin-left:5px;
       }
       .allItemsUl li a
       {
           line-height:23px;
           background:url(../img/tagright.gif) no-repeat right top;
           padding-left:10px;
           padding-right:10px;
           float:left;
       }
       .itemOperateButton
       {
           width:60px;
       }
    </style>
    <link href="../outstyle.css" rel="stylesheet" type="text/css" />
<script src="../js/dropdowncontent.js" type="text/javascript"></script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div class ="MasterDiv" id="MasterDiv">
                <div class ="searchItemsDiv">
                    <div class ="searchFilterDiv" id="searchFilterDiv" style=" display:none">
                        <label>宝贝名称：</label>
                        <asp:TextBox ID="SearchKeyItemTitleTextBox"   runat="server"></asp:TextBox>
                        &nbsp;&nbsp;
                        <label>宝贝状态：</label>
                        <asp:DropDownList ID="SearchKeyItemStatusDropDownList" Width="100px" runat="server">
                            <asp:ListItem Value ="" Selected="True" >不限</asp:ListItem>
                            <asp:ListItem  Value ="new">全新</asp:ListItem>
                            <asp:ListItem Value="second">二手</asp:ListItem>
                            <asp:ListItem Value ="unused">个人闲置</asp:ListItem>
                        </asp:DropDownList>
                        &nbsp;&nbsp;
                        <input id="searchItemButton" value="搜索" style =" width:80px; text-align:center ;" type ="button"
                          runat="server"  onserverclick ="searchItemButton_ServerClick"/>
                    </div>
                    <div style =" text-align:center; padding-left:15%;">
                        <a id="searchFilterAnchor" title ="展开/折叠 设置搜索条件" onclick ="collapseByAnchor(this);">展开/折叠</a>
                    </div>                    
                </div>
                <div style =" padding-left:10px;  padding-top:10px;">
                    <ul class ="allItemsUl">
                        <li ><a>所有的宝贝</a></li>
                    </ul>                  
                </div>
                <div style =" border:solid 1px lightblue; float:none; margin-top:23px;">
                </div>
                
                
                <table class ="DataListHeaderTable" style =" width:100%; background-color:#ECECEC;">
                    <tr >
                        <td style =" width:10%" title ="选择"></td>
                        <td style =" width:15%" title ="图片"></td>
                        <td style =" width:20%" title ="宝贝名称">宝贝名称</td>
                        
                        <td style =" width:10%" title ="宝贝状态"><span class="text">宝贝状态</span></td>
                        <td style =" width:10%" title ="数量"><span class="text">数量</span></td>
                        <td style =" width:15%" title ="上架时间"><span class="text">上架时间</span></td>
                        <td style =" width:10%" title ="当前价格"><span class="text">当前价格</span></td>
                        <td style =" width:10%" title ="修改设置"><span class="text">修改设置</span></td>
                    </tr>
                </table>
                <div class="DataListHeaderToolDiv">
                    <table>
                        <tr>
                            <td >
                                <asp:CheckBox ID="selectAllItemCheck0" runat="server"  OnCheckedChanged ="selectAllItemCheck0_ServerCheckedChanged" AutoPostBack="true" Text =" 全选"/>  
                            </td>
                            <td>
                                <asp:CheckBox ID="selectOthersItemCheck" runat="server" AutoPostBack ="true"   OnCheckedChanged ="selectOthersItemCheck_ServerCheckedChanged" Text =" 反选"/>
                            </td>
                            <td>
                                <input  type="button" class="itemOperateButton"  value ="增加" onclick ="window.location.href='ItemCate.aspx';"/>
                            </td>
                            <td>
                                <input  type="button" class="itemOperateButton" value ="删除" id="DeleteButton" runat="server" onserverclick="DeleteButton_Click"/>
                            </td>
                        </tr>
                    </table>                    
                </div>
                <asp:DataList ID="MainDataList" runat="server" DataKeyField ="RECID" Width="100%">
                    <ItemStyle  Width ="100%"/>
                    <ItemTemplate>
                        <div style =" border-bottom:solid 1px lightGray;">
                        <table class ="DataListItemTable" onmouseover ="this.bgColor='lightBlue';" onmouseout="this.bgColor='white';">
                            <tr>
                                <td style =" width:10%; text-align:center ;" title ="选择">
                                    <asp:CheckBox ID="taobaoitemcheckbox" runat="server" />
                                    <input type="hidden" name="taobaoitemiidHidden"  value='<%#Eval("taobaoiid").ToString() %>'/>
                                    <input type="hidden" name="taobaoitemrecidHidden"  value='<%#Eval("RECID").ToString() %>'/>
                                </td>
                                <td style =" width:15%" >
                                    <a title="点击查看详细信息" target="_blank" href ='<%#GetItemUrl(Eval("RECID").ToString()) %>'><img style=" border:none; width:80px; height :80px"  alt="" src ='<%#Eval("taobaopic_path").ToString()%>'/></a>
                                </td>
                                <td style =" width:20%" >
                                    <a title='<%# Eval("taobaotitle").ToString()%>' target="_blank" href ='<%#GetItemUrl(Eval("RECID").ToString()) %>'><%# Eval("taobaotitle").ToString()%></a>
                                </td>
                                <td style =" width:10%; text-align:center ;" title ="宝贝状态">
                                    <%# (Eval("taobaostuff_status").ToString() == "new") ? "全新" :  ((Eval("taobaostuff_status").ToString() == "second")?"二手":"个人闲置") %>
                                </td>
                                <td style =" width:10%" title ="数量">
                                    <%# Eval("taobaonum").ToString () %>
                                </td>
                                <td style =" width:15%" title ="上架时间">
                                    <%#Eval("taobaolist_time").ToString () %>
                                </td>
                                <td style =" width:10%" title ="当前价格">
                                    <%#Eval ("taobaoprice").ToString () %>
                                </td>
                                <td style =" width:10%" title ="修改设置">
                                    <a href ='<%# "ItemInfo.aspx?type=edit&id="+Eval("taobaoiid").ToString() %>'><img alt="修改宝贝"  src ="../img/edititem.gif" /></a>
                                </td>
                            </tr>
                        </table>
                       </div>
                    </ItemTemplate>
                </asp:DataList>
                <div id="NoDataDiv" runat ="server"  style =" vertical-align:middle ; margin:3px 0px 3px 0px; padding-left:20px; ">
                    <span style =" color :Red ">对不起， 没有找到你查找的数据！</span>
                </div>
                <div class ="DataListFooterToolDiv">
                    <table>
                        <tr>
                            <td >
                                <asp:CheckBox ID="selectAllItemCheck1" runat="server"  AutoPostBack="true"  OnCheckedChanged ="selectAllItemCheck1_ServerCheckedChanged" Text =" 全选"/>
                            </td>                             
                        </tr>
                    </table>   
                </div>
                <cc1:WebPager ID="MainWebPager" PageSize ="10" ControlToPaginate ="MainDataList"  OnPageIndexChanged ="MainWebPager_PageIndexChanged"  runat="server" />
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>

    <script src="../js/cookie.js" type="text/javascript"></script>
    <script type ="text/javascript" >
        var _searchDivCookieName = "searchFilterDisplay";
        function collapseByAnchor(thisObj) {
            var searchfilterdiv = document.getElementById("searchFilterDiv");
            if (searchfilterdiv.style.display != "none") {
                thisObj.className = "collapsed";
                searchfilterdiv.style.display = "none";
                setCookie("f980","searchFilterDisplay", "none");
            }
            else {
                thisObj.className = "";
                searchfilterdiv.style.display = "block";
                setCookie("f980","searchFilterDisplay","block");
            }
        }
        function initsearchFilter() {
            var searchFilterDisplayCookie = getCookie("f980","searchFilterDisplay");
            var searchfilteranchor = document.getElementById("searchFilterAnchor");
            var searchfilterdiv =document.getElementById("searchFilterDiv");
            if (searchFilterDisplayCookie == "none") {
                searchfilterdiv.style.display = "none";
                searchfilteranchor.className = "collapsed";
            }
            else {
                searchfilterdiv.style.display = "block";
                searchfilteranchor.className = "";
            }
        }

        initsearchFilter();
        initWidthAndHeight();
        function initWidthAndHeight() {
            document.getElementById("MasterDiv").style.width = screen.availWidth - 200 + "px";
        }
	    
    </script>
</asp:Content>
